public class Date {
    private int year;
    private int month;
    private int day;

    public Date() {
        System.out.println("调用了无参的构造方法");
    }

    public Date(int year,int month,int day) {
        this.year = year;
        this.month = month;
        this.day = day;
        this.print();
    }
    public void setYear(int year) {
        this.year = year;
        Date date2 = new Date();
    }

    public int getYear() {
        return this.year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public void print() {
        System.out.println(year +"年"+ month +"月"+ day +"日");
    }



}
